package com.lidx.back.statistics.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lidx.back.statistics.dao.IFilterRecordDao;
import com.lidx.back.statistics.entity.FilterRecord;
import com.lidx.back.statistics.service.IFilterRecordService;
@Repository
public class FilterRecordServiceImpl implements IFilterRecordService {

	@Autowired
	private IFilterRecordDao recordDao;
	
	public void saveRecord(FilterRecord record) {
		record.setRecordTime(new Date());
		recordDao.insertRecord(record);
	}

	public List<FilterRecord> getRecords() {
		return recordDao.getRecords();
	}

	public List<Object[]> getRecordsWithParams(String action,
			String versionType, String from, String to) {
		return recordDao.getRecordsWithParams(action,versionType,from,to);
	}

}
